﻿using Polaris.Domain.Model.Dto.Article.Request;
using Polaris.Domain.Model.Dto.Article.Response;
using Polaris.Domain.Model.Entity.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Polaris.Domain.Interfaces.Admin
{
    public interface IArticle
    {
        /// <summary>
        /// 创建文章
        /// </summary>
        /// <param name="create"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task CreateArticle(CreateArticleInfoRequest create, Guid? userId);

        /// <summary>
        /// 修改文章信息
        /// </summary>
        /// <param name="update"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task UpdateArticle(UpdateArticleInfoRequest update, Guid? userId);

        /// <summary>
        /// 获取文章列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<PaginationInfo<ArticleListInfoResponse>> GetArticleList(ArticleQueryRequest query);

        /// <summary>
        /// 根据id获取文章预览内容
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<PreviewArticleResponse> GetArticleContentById(string id);

        /// <summary>
        /// 根据id获取文章
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<UpdateArticleInfoRequest> GetArticleInfoById(string id);

        /// <summary>
        /// 删除文章根据id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteArticleById(string id,Guid? userId);

    }
}
